return sum ^ (sum>>32);
}
- __attribute__((weak)) int xc_hvm_build(
- int xc_handle,
- uint32_t domid,
- int memsize,
- const char *image_name)
+ __attribute__((weak))
+ int xc_hvm_build(int xc_handle,
+ uint32_t domid,
+ int memsize,
+ const char *image_name)
{
- return -ENOSYS;
+ errno = ENOSYS;
+ return -1;
+ }
+
+ __attribute__((weak))
+ int xc_hvm_save(int xc_handle, int io_fd, uint32_t dom, uint32_t max_iters,
+ uint32_t max_factor, uint32_t flags,
+ int (*suspend)(int domid))
+ {
+ errno = ENOSYS;
+ return -1;
+ }
+
+ __attribute__((weak))
+ int xc_hvm_restore(int xc_handle, int io_fd, uint32_t dom,
+ unsigned long nr_pfns, unsigned int store_evtchn,
+ unsigned long *store_mfn, unsigned int console_evtchn,
+ unsigned long *console_mfn,
+ unsigned int pae, unsigned int apic)
+ {
+ errno = ENOSYS;
+ return -1;
}
+
+__attribute__((weak)) int xc_get_hvm_param(
+ int handle, domid_t dom, int param, unsigned long *value)
+{
+ return -ENOSYS;
+}
+
+__attribute__((weak)) int xc_set_hvm_param(
+ int handle, domid_t dom, int param, unsigned long value)
+{
+ return -ENOSYS;
+}
{
}
- int arch_set_info_guest(struct vcpu *v, vcpu_guest_context_t *c)
+ int arch_set_info_guest(struct vcpu *v, vcpu_guest_context_u c)
{
- memcpy(&v->arch.ctxt, &c->user_regs, sizeof(c->user_regs));
+ struct domain *d = v->domain;
+
+ memcpy(&v->arch.ctxt, &c.nat->user_regs, sizeof(c.nat->user_regs));
- printk("Domain[%d].%d: initializing\n",
- v->domain->domain_id, v->vcpu_id);
+ printk("Domain[%d].%d: initializing\n", d->domain_id, v->vcpu_id);
+
+ if (d->arch.htab.order == 0)
+ panic("Page table never allocated for Domain: %d\n", d->domain_id);
+ if (d->arch.rma_order == 0)
+ panic("RMA never allocated for Domain: %d\n", d->domain_id);
- if (v->domain->arch.htab.order == 0)
- panic("Page table never allocated for Domain: %d\n",
- v->domain->domain_id);
- if (v->domain->arch.rma_order == 0)
- panic("RMA never allocated for Domain: %d\n",
- v->domain->domain_id);
+ d->shared_info->wc_sec = dom0->shared_info->wc_sec;
+ d->shared_info->wc_nsec = dom0->shared_info->wc_nsec;
+ d->shared_info->arch.boot_timebase = dom0->shared_info->arch.boot_timebase;
set_bit(_VCPUF_initialised, &v->vcpu_flags);